A hard-disk drive (HDD) is a non-volatile storage device that is housed in a protective enclosure and stores digitally encoded data on one or more circular disks having magnetic surfaces. When an HDD is in operation, each magnetic-recording disk is rapidly rotated by a spindle system. Data is read from and written to a magnetic-recording disk using a read/write head that is positioned over a specific location of a disk by an actuator. A read/write head uses a magnetic field to read data from and write data to the surface of a magnetic-recording disk. Write heads make use of the electricity flowing through a coil, which produces a magnetic field. Electrical pulses are sent to the write head, with different patterns of positive and negative currents. The current in the coil of the write head induces a magnetic field across the gap between the head and the magnetic disk, which in turn magnetizes a small area on the recording medium.
Modulated or poor writing is one cause of failure with HDDs. There are numerous conditions that can cause poor writing, whereby the written data pattern is so poor in quality that the data is impossible to read back and, consequently, the user can lose data. Thus, consistent quality writing is a fundamental attribute of reliable HDDs.
Any approaches described in this section are approaches that could be pursued, but not necessarily approaches that have been previously conceived or pursued. Therefore, unless otherwise indicated, it should not be assumed that any of the approaches described in this section qualify as prior art merely by virtue of their inclusion in this section.